package com.lechuang.member.controller;


import com.lechuang.common.result.PageResult;
import com.lechuang.common.result.Result;
import com.lechuang.member.manager.MemberLevelManager;
import com.lechuang.member.vo.MemberLevelVo;
import com.lechuang.member.vo.MemberListVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/memberLevel")
@Log4j2
@Tag(name = "会员等级类")
public class MemberLevelController {

    @Resource
    private MemberLevelManager memberLevelManager;


    @Operation(summary = "会员等级列表查询")
    @PostMapping("/queryList")
    public Result<List<MemberLevelVo>> queryList(){
        log.info("会员等级列表------");
        List<MemberLevelVo> memberLevelVoList  = memberLevelManager.list();
        return Result.success(memberLevelVoList);
    }
}
